 package cn.exrick.xboot.modules.gatestation.dao;

 import cn.exrick.xboot.base.XbootBaseDao;
 import cn.exrick.xboot.modules.gatestation.entity.NaturalgasEquipment;
 import org.springframework.data.jpa.repository.Query;

 import java.util.List;


 /**
  * 天燃气门站设备数据处理层
  * @author yck
  */
 public interface NaturalgasEquipmentDao extends XbootBaseDao<NaturalgasEquipment, String> {

  List<NaturalgasEquipment> findByEquipmentNameAndAndGateStationId(String equipmentName,String gateStationId);

  List<NaturalgasEquipment> findByEquipmentIdAndGateStationId(String equipmentId,String gateStationId);

  List<NaturalgasEquipment> findByGateStationId(String gateStationId);
  @Query("from NaturalgasEquipment where (equipmentId=:equipmentId or equipmentName=:equipmentName) and gateStationId=:gateStationId and id<>:id")
  List<NaturalgasEquipment> findByContidion(String equipmentId,String gateStationId,String equipmentName,String id);
 }